package pl.edu.agh.soa.monitoring.cep;

import com.espertech.esper.event.EventBean;

public class EventInfo {
	private String statementID;
	private String eventType;
	private EventBean[] events;
	
	public void setStatementID(String statementID) {
		this.statementID = statementID;
	}

	public String getStatementID() {
		return statementID;
	}

	public void setEventType(String eventType) {
		this.eventType = eventType;
	}

	public String getEventType() {
		return eventType;
	}

	public void setEvents(EventBean[] events) {
		this.events = events;
	}

	public EventBean[] getEvents() {
		return events;
	}

	/**
	 * Constructs a <code>String</code> with all attributes
	 * in name = value format.
	 *
	 * @return a <code>String</code> representation 
	 * of this object.
	 */
	public String toString()
	{
	    final String TAB = "    ";
	    
	    String retValue = "";
	    
	    for(int i =0; i < events.length; i++){
	    	retValue = events[i].getUnderlying().toString() + ",";
	    }
	    
	    retValue = "EventInfo ( "
	        + super.toString() + TAB
	        + "statementID = " + this.statementID + TAB
	        + "eventType = " + this.eventType + TAB
	        + "events = " + retValue
	        + ")";
	
	    return retValue;
	}


	
}
